package com.ukao.pad.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by ukaodev on 2017/5/26.
 */

public class ChooseClothingItem implements Parcelable {
    String name;
    String id;
    String parentId;
    boolean isCheck;

    public ChooseClothingItem(String name, String id, String parentId, boolean isCheck) {
        this.name = name;
        this.id = id;
        this.parentId = parentId;
        this.isCheck = isCheck;
    }

    public boolean isCheck() {

        return isCheck;
    }

    public void setCheck(boolean check) {
        isCheck = check;
    }

    public ChooseClothingItem(String name, String id, String parentId) {
        this.name = name;
        this.id = id;
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeString(this.id);
        dest.writeString(this.parentId);
        dest.writeByte(this.isCheck ? (byte) 1 : (byte) 0);
    }

    protected ChooseClothingItem(Parcel in) {
        this.name = in.readString();
        this.id = in.readString();
        this.parentId = in.readString();
        this.isCheck = in.readByte() != 0;
    }

    public static final Creator<ChooseClothingItem> CREATOR = new Creator<ChooseClothingItem>() {
        @Override
        public ChooseClothingItem createFromParcel(Parcel source) {
            return new ChooseClothingItem(source);
        }

        @Override
        public ChooseClothingItem[] newArray(int size) {
            return new ChooseClothingItem[size];
        }
    };
}
